//#include<iostream>
//using namespace std;
//class A
//{
//public:
//	A()
//	{
//		_a = 0;
//		cout << "A()" << endl;
//	}
//	A(int a)
//		:_a(a)
//	{
//		cout << "A(int a)" << endl;
//		cout << a << endl;
//	}
//	~A()
//	{
//		cout << "~A()" << endl;
//	}
//private:
//	int _a;
//};
//int main()
//{
//	A aa(1);
//	return 0;
//}
#include<iostream>
using namespace std;
class A
{
	friend class B;
public:
	A(int a = 0)
	{
		_a = a;
		cout << "A(int a = 0)" << endl;
		cout << _a << endl;
	}
	~A()
	{
		cout << "~A()" << endl;
	}
private:
	int _a;
};
class B
{
public:
	B()
		/*:_b(10)
		,aa(10)*/
	{
		cout << "B()" << endl;
		cout << _b << endl;
		cout << aa._a << endl;
	}
	~B()
	{
		cout << "~B()" << endl;
	}
private:
	int _b;
	A aa;
};
int main()
{
	B bb;
	return 0;
}